<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <style type="text/css">
        <!--
        body {
            margin-left: 0px;
            margin-top: 0px;
            margin-right: 0px;
            margin-bottom: 0px;
        }
        .STYLE1 {font-size: 12px}
        .STYLE3 {font-size: 12px; font-weight: bold; }
        .STYLE4 {
            color: #03515d;
            font-size: 12px;
        }
        -->
    </style>
    <script src="../../js/jquery-1.9.1.min.js"></script>
    <script src="../../js/plan/plan.js"></script>
    <script>
        var  highlightcolor='#c1ebff';
        //此处clickcolor只能用win系统颜色代码才能成功,如果用#xxxxxx的代码就不行,还没搞清楚为什么:(
        var  clickcolor='#51b2f6';
        function  changeto(){
            source=event.srcElement;
            if  (source.tagName=="TR"||source.tagName=="TABLE")
                return;
            while(source.tagName!="TD")
                source=source.parentElement;
            source=source.parentElement;
            cs  =  source.children;
//alert(cs.length);
            if  (cs[1].style.backgroundColor!=highlightcolor&&source.id!="nc"&&cs[1].style.backgroundColor!=clickcolor)
                for(i=0;i<cs.length;i++){
                    cs[i].style.backgroundColor=highlightcolor;
                }
        }

        function  changeback(){
            if  (event.fromElement.contains(event.toElement)||source.contains(event.toElement)||source.id=="nc")
                return
            if  (event.toElement!=source&&cs[1].style.backgroundColor!=clickcolor)
//source.style.backgroundColor=originalcolor
                for(i=0;i<cs.length;i++){
                    cs[i].style.backgroundColor="";
                }
        }

        function  clickto(){
            source=event.srcElement;
            if  (source.tagName=="TR"||source.tagName=="TABLE")
                return;
            while(source.tagName!="TD")
                source=source.parentElement;
            source=source.parentElement;
            cs  =  source.children;
//alert(cs.length);
            if  (cs[1].style.backgroundColor!=clickcolor&&source.id!="nc")
                for(i = 0; i < cs.length; i++){
                    cs[i].style.backgroundColor=clickcolor;
                }
            else
                for(i=0;i<cs.length;i++){
                    cs[i].style.backgroundColor="";
                }
        }
    </script>


</head>

<body onload="getIndustries(), industryLinkage(), getPackageInfo(), getDateAndTime(), locSearchSubmit('origin'), getProvinces(), getCities(), getDistricts(), positionLinkage()">
<form id="plan_add_form" >
    <table width="100%">
        <tr background="images/tab_05.gif" height="30">
            <td width="5%"><div align="center"><img src="images/tb.gif" width="16" height="16" /></div></td>
            <td width="95%" class="STYLE1"><span class="STYLE3">你当前的位置</span>：[排期中心]-[添加排期]</td>
        </tr>
    </table>

    <p>
        <label>广告所属行业：</label>
        <select name="industryId" id="_industry"></select>
        <div id="_qualification_data"></div>
    </p>

    <div id="_plan_apply">
        <p>
            <label>广告名称：</label>
            <input type="text" name="name" id="_name"/>
        </p>

        <p>
            <label>广告类型：</label>
            <select name="type" id="_type">
                <option value="0">图片</option>
                <option value="1">视频</option>
                <option value="2">HTML</option>
            </select>
        </p>

        <p>
            <label>投放 开始日期：</label>
            <input type="date" name="startDate" id="_start_date"/>
            <label>结束日期：</label>
            <input type="date" name="endDate" id="_end_date"/>
        </p>

        <p>
            <label>每日 投放时间：</label><br>
            <table width="50%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <td><input type="checkbox" name="launchTime" value="0" id="_0"/>0时</td>
                    <td><input type="checkbox" name="launchTime" value="1" id="_1"/>1时</td>
                    <td><input type="checkbox" name="launchTime" value="2" id="_2"/>2时</td>
                    <td><input type="checkbox" name="launchTime" value="3" id="_3"/>3时</td>
                    <td><input type="checkbox" name="launchTime" value="4" id="_4"/>4时</td>
                    <td><input type="checkbox" name="launchTime" value="5" id="_5"/>5时</td>
                    <td><input type="checkbox" name="launchTime" value="6" id="_6"/>6时</td>
                    <td><input type="checkbox" name="launchTime" value="7" id="_7"/>7时</td>
                    <td><input type="checkbox" name="launchTime" value="8" id="_8"/>8时</td>
                    <td><input type="checkbox" name="launchTime" value="9" id="_9"/>9时</td>
                    <td><input type="checkbox" name="launchTime" value="10" id="_10"/> 10时</td>
                    <td><input type="checkbox" name="launchTime" value="11" id="_11"/> 11时</td>
                </tr>
                <tr>
                    <td><input type="checkbox" name="launchTime" value="12" id="_12"/> 12时</td>
                    <td><input type="checkbox" name="launchTime" value="13" id="_13"/> 13时</td>
                    <td><input type="checkbox" name="launchTime" value="14" id="_14"/> 14时</td>
                    <td><input type="checkbox" name="launchTime" value="15" id="_15"/> 15时</td>
                    <td><input type="checkbox" name="launchTime" value="16" id="_16"/> 16时</td>
                    <td><input type="checkbox" name="launchTime" value="17" id="_17"/> 17时</td>
                    <td><input type="checkbox" name="launchTime" value="18" id="_18"/> 18时</td>
                    <td><input type="checkbox" name="launchTime" value="19" id="_19"/> 19时</td>
                    <td><input type="checkbox" name="launchTime" value="20" id="_20"/> 20时</td>
                    <td><input type="checkbox" name="launchTime" value="21" id="_21"/> 21时</td>
                    <td><input type="checkbox" name="launchTime" value="22" id="_22"/> 22时</td>
                    <td><input type="checkbox" name="launchTime" value="23" id="_23"/> 23时</td>
                </tr>
            </table>

        </p>
        <p>
            <button id="_show_select_package">选择资源包</button>
            <button id="_show_select_loc">选择资源位</button>
        </p>
        <div id="_select_package">
            <label>选择资源包：</label>
            <div id="resource_data"></div>
            <input type="button" value="添加" onclick="addPackages()"/>
            <input type="button" value="删除" onclick="deletePackages()"/>
            </tr>
        </div>

        <div id="_select_loc">
            <label>选择资源位：</label>
            <form id="loc_search_form">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr background="images/bg1.png">
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">资源位筛选 </span> &nbsp;&nbsp; <span class="STYLE1"><input type="button" value="查询" onclick="locSearchSubmit()"/> </span></div></th>
                        <th width="90%" height="35" colspan="5" background="images/bg1.png" bgcolor="#FFFFFF"><span class="STYLE1"></span></th>
                    </tr>
                    <tr>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">基础属性 >></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">资源位ID: <input type="text" name="locId"/></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">资源位名称: <input type="text" name="locName"/></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">省份: <select name="province" id="_province"></select></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">城市: <select name="city" id="_city"></select></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">区/县: <select name="district" id="_district"></select></span></div></th>
                    </tr>

                    <tr>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">
                                        支持模板类型:
                                        <select name="templateType" id="_template_type">
                                            <option value="">请选择</option>
                                            <option value="0">图片</option>
                                            <option value="1">视频</option>
                                            <option value="2">HTML</option>
                                        </select></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">
                                        性别:
                                        <select name="sex" id="_sex">
                                            <option value="">请选择</option>
                                            <option value="0">男</option>
                                            <option value="1">女</option>
                                        </select></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">
                                        年龄:
                                        <select name="age" id="_age">
                                            <option value="">请选择</option>
                                            <option value="0">20岁以下</option>
                                            <option value="1">20-40岁</option>
                                            <option value="2">40-60岁</option>
                                            <option value="3">60-80岁</option>
                                            <option value="4">80岁以上</option>
                                        </select></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">
                                        年龄:
                                        <select name="marriage" id="_marriage">
                                            <option value="">请选择</option>
                                            <option value="0">已婚</option>
                                            <option value="1">未婚</option>
                                        </select></span></div></th>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">
                                        教育水平:
                                        <select name="education" id="_education">
                                            <option value="">请选择</option>
                                            <option value="0">小学</option>
                                            <option value="1">初中</option>
                                            <option value="2">高中</option>
                                            <option value="3">专科</option>
                                            <option value="4">本科</option>
                                            <option value="5">硕士</option>
                                            <option value="6">博士</option>
                                        </select></span></div></th>
                    </tr>
                </table>
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <th width="10%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">用户属性 >></span></div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="1" id="_manage_money"/>关注理财</div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="2" id="_recreation"/>关注娱乐</div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="3" id="_game"/>关注游戏</div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="4" id="_shopping"/>关注购物</div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="5" id="_trip"/>关注旅行</div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="6" id="_car"/>关注汽车</div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="7" id="_infant_mom"/>关注母婴</div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="8" id="_social_contact"/>关注社交</div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="9" id="_sport"/>关注运动</div></th>
                        <th width="5%" height="35" background="images/bg1.png" bgcolor="#FFFFFF"><div align="center"><input type="checkbox" name="userAttribute" value="10" id="_life"/>关注生活</div></th>
                    </tr>

                </table>
            </form>
            <table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" bgcolor="#c0de98" onmouseover="changeto()"  onmouseout="changeback()">
                <thead>
                    <tr>
                        <th width="10%" height="22" background="images/bg2.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1"><input type="checkbox" name="locs" value="">全选</span></div></th>
                        <th width="10%" height="22" background="images/bg2.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">序号</span></div></th>
                        <th width="20%" height="22" background="images/bg2.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">名称</span></div></th>
                        <th width="20%" height="22" background="images/bg2.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">位置</span></div></th>
                        <th width="20%" height="22" background="images/bg2.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">高度</span></div></th>
                        <th width="20%" height="22" background="images/bg2.png" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">宽度</span></div></th>
                    </tr>
                </thead>
                <tbody class="loc_search_data" id="loc_search_data"></tbody>
            </table>
        </div>
        <p>
            <label>已选定资源包：</label>
            <input type="text" name="packageIds" id="_packageIds"/>
            <label>已选定资源位：</label>
            <input type="text" name="locIdList" id="_locIdList"/>
            <label>可用资源位个数：</label>
            <span id="_locsNum"></span> <span id="_locs" style="display: none"></span>
        </p>
        <p>
            <label>资源位汇总：</label>
            <input type="text" name="locIds" id="_locIds"/>
        </p>
        <p>
            <label>上传素材：</label>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <thead>
            <tr>
                <th width="3%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">序号</span></div></th>
                <th width="3%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">支持类型</span></div></th>
                <th width="3%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">大小限制</span></div></th>
                <th width="3%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">高度</span></div></th>
                <th width="3%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">宽度</span></div></th>
                <th width="3%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">素材链接</span></div></th>
                <th width="3%" height="22" background="images/bg.gif" bgcolor="#FFFFFF"><div align="center"><span class="STYLE1">播放时间(秒)</span></div></th>
            </tr>
            </thead>
            <form id="materials_form">
                <tbody class="material_data" id="material_data"></tbody>
            </form>
        </table>

        <p>
            <input type="button" name="" value="提交" onclick="addSubmitButtonClick()">

            <!-- input类型为reset定义重置按钮 -->
            <input type="reset" name="" value="重置">

            <input type="button" name="" value="返回">
        </p>

    </div>


</form>
</body>
</html>